﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<List<ForumsListEntity>>" %>
<div class="fr-widget">
    <div class="fr-widget-header">
        Forum List
    </div>
    <div class="collapse-panel">
        <%--<table cellpadding="0" cellspacing="5" width="100%">
            <tr>
                <td>
                </td>
            </tr>
        </table>--%>
        <div class="gridview">
            <table class="datatable" cellspacing="0" cellpadding="0" style="width: 100%; border-collapse: collapse;">
                <tr>
                    <th class="header width5" scope="col">
                        <input type='checkbox' onclick='$.MvcForum.toggleCheckbox(this.checked)' />
                    </th>
                    <th class="header" scope="col">
                        Forum Name
                    </th>
                    <th class="header" scope="col">
                        Topics
                    </th>
                    <th class="header" scope="col">
                        Posts
                    </th>
                    <th class="header" scope="col">
                        Option
                    </th>
                </tr>
                <%foreach (var forum in Model)
                  {

                %>
                <tr class="row" id="row_<%=forum.ForumId%>">
                    <td class="center">
                        <input type="checkbox" value="<%=forum.ForumId %>" class="item-selected" />
                    </td>
                    <td>
                        <%=ForumContext.Padding(forum.Level) + Html.Encode(forum.ForumName) %>
                    </td>
                    <td class="center width10">
                        <%=Html.Encode(forum.TotalTopics) %>
                    </td>
                    <td class="center width10">
                        <%=Html.Encode(forum.TotalReplies) %>
                    </td>
                    <td class="center width8">
                        <a href="javascript:void(0)" onclick="$.MvcForum.loadEdit('forum',<%=forum.ForumId %>)">
                            Edit</a>
                    </td>
                </tr>
                <%
                    }%>
            </table>
        </div>
    </div>
</div>
